#!/usr/bin/env python
# coding=utf-8
# __author__ = 'Yunchao Ling'

infile1=open("D:/data/if/Journal.tsv","r")
infile1.readline()
jr1={}
jr2={}
infile1.readline()
for line in infile1:
    line=line.rstrip("\n")
    splitline=line.split("\t")
    med_abbr=splitline[2]
    iso_abbr=splitline[5]
    if med_abbr!="":
        jr1[med_abbr]=0
    if iso_abbr!="":
        jr2[iso_abbr]=0
infile1.close()

infile2=open("D:/data/if/ana.out","r")
for line in infile2:
    line=line.rstrip("\n")
    splitline=line.split("|")
    title=splitline[1]
    if not (jr1.has_key(title) or jr2.has_key(title)):
        print line
infile2.close()